/*
 * @Author: wuqingchun
 * @Date: 2025-01-18 15:52:49
 * @Description: 
 * @LastEditors: wuqingchun
 * @LastEditTime: 2025-01-18 17:18:14
 */
#include <stdio.h>
#include <pthread.h>
#include <syscall.h>
#include <unistd.h>

#include "exec_string.h"

void* __ThreadFunc(void* arg)
{
    printf("[%d] [%d] thread is running\n", getpid(), syscall(SYS_gettid));

    sleep(1);

    printf("[%d] [%d] thread will exit\n", getpid(), syscall(SYS_gettid));

    return NULL;
}

int main(int argc, char** argv)
{
    printf("Hello world!\n");

    pthread_t stThread1;
    pthread_create(&stThread1, NULL, __ThreadFunc, NULL);
    pthread_join(stThread1, NULL);

    printf("length=%lu\n", exec_strlen("jjjjjjjjjjjjjjjjjj"));

    return 0;
}